/*
 * desktop.h
 *
 *  Created on: 2021年3月23日
 *      Author: root
 */

#ifndef GUI_DESKTOP_H_
#define GUI_DESKTOP_H_

#include <common/types.h>
#include <gui/widget.h>

namespace myos{
	namespace gui{

		class Desktop:public CompositeWidget,public myos::drivers::MouseEventHandle{
		protected:
			myos::common::uint32_t MousX;
			myos::common::uint32_t MousY;
		public:
			Desktop(myos::common::int32_t w,myos::common::int32_t h,
					myos::common::uint8_t r,myos::common::uint8_t g,myos::common::uint8_t b);
			~Desktop();

			void Draw(myos::common::GraphicsContext* gc);

			void OnMouseDown(myos::common::uint8_t button );
			void OnMouseUP(myos::common::uint8_t button );
			void OnMouseMove(int x,int y);
		};

	}
}



#endif /* GUI_DESKTOP_H_ */
